from coffee.package.coffee_machine import CoffeeMachine

if __name__ == '__main__':
    machine = CoffeeMachine()

    while True:
        # 展示咖啡
        machine.display()
        # 选择咖啡
        selectd_coffee = machine.select_coffee()
        # 投入钱币
        coin = machine.input_money(coffee=selectd_coffee)
        # 制作咖啡
        machine.make_coffee(coffee=selectd_coffee, money=coin)

        answer = input("是否继续购买？Y：是，N：否")
        if answer == 'Y':
            continue
        else:
            break

    # 打印记录
    machine.print_records()
